﻿@{
    Bundle("jquery_timepicker");
    Bundle("jquery_validate");
}
           
<script type="text/javascript">
    jQuery(document).ready(function(){
        jQuery('@ID("#form")').validate({
            rules: {
                countryID: {
                    digits: true
                },
                regionID: {
                    digits: true
                },
                categoryID: {
                    digits: true
                },
                tagID: {
                    digits: true
                }
            }
        });
        jQuery('@ID("#txt_createdFrom")').datetimepicker();
        jQuery('@ID("#txt_createdTo")').datetimepicker();
    });
</script>
<form action="@Url.Action(Loc.Act("Index"))" method="get">
    <input type="hidden" name="flagMask" value="None" />
    <ul>
        <li>
            <label>@T(Res.Name("SearchTerm"))</label>
        </li>
        <li>
            <input type="text" name="searchTerm" value="@Request.QueryParam("searchTerm")" maxlength="100" />
        </li>
        <li>
            <label>@T(Res.Name("Country"))</label>
        </li>
        <li>
            <input type="text" name="countryID" value="@Request.QueryParam("countryID")" />
        </li>
        <li>
            <label>@T(Res.Name("Region"))</label>
        </li>
        <li>
            <input type="text" name="regionID" value="@Request.QueryParam("regionID")" />
        </li>
        <li>
            <label>@T(Res.Name("Category"))</label>
        </li>
        <li>
            <input type="text" name="categoryID" value="@Request.QueryParam("categoryID")" />
        </li>
        <li>
            <label>@T(Res.Name("Tag"))</label>
        </li>
        <li>
            <input type="text" name="tagID" value="@Request.QueryParam("tagID")" />
        </li>
        <li>
            <label>@T(Res.Name("Attributes"))</label>
        </li>
        <li>
            <input type="text" name="attributeIDs" value="@Request.QueryParam("attributeIDs")" />
        </li>
        <li>
            <label>@T(Res.Name("CreatedFrom"))</label>
        </li>
        <li>
            <input id="@ID("txt_createdFrom")" type="text" name="createdFrom" value="@Request.QueryParam("createdFrom")" />
        </li>
        <li>
            <label>@T(Res.Name("CreatedTo"))</label>
        </li>
        <li>
            <input id="@ID("txt_createdTo")" type="text" name="createdTo" value="@Request.QueryParam("createdTo")" />
        </li>
        <li>
            <label>&and;</label>
        </li>
        <li>
            <select name="flagMask" multiple>
                <option value="Active" @(Request.QueryParam("flagMask").Contains("Active") ? "selected" : String.Empty)>@T(Res.In("API").Of("Enum").Of("CatalogSupplierFlags").Name("Active"))</option>
                <option value="Promoted" @(Request.QueryParam("flagMask").Contains("Promoted") ? "selected" : String.Empty)>@T(Res.In("API").Of("Enum").Of("CatalogSupplierFlags").Name("Promoted"))</option>
            </select>
        </li>
    </ul>
    <ul class="bar toolbar">
        <li><button class="button" type="submit">@T(Res.In("Common").Of("Act").Name("Submit"))</button></li>
    </ul>
</form>
